import { axios } from '../../utils/request'

/**
 * 工艺路线
 */
const api = {
    save: '/erp/processRoute/save',
    pageList: '/erp/processRoute/getList',
    delete: '/erp/processRoute/delete',
    details: '/erp/processRoute/getDetailList',
    examine: '/erp/processRoute/examine',
    listErpProcessRouteDetailVo: '/erp/processRoute/listErpProcessRouteDetailVo',
    listProcessRouteAndPriceDetailVoByRouteDetailIds: '/erp/processRoute/listProcessRouteAndPriceDetailVoByRouteDetailIds',
}

/**
 * 保存
 */
export function save(data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

/**
 * 列表
 */
export function list(data) {
    return axios({
        url: api.pageList,
        method: "get",
        params: data
    })
}

/**
 * 删除
 */
export function remove(data) {
    return axios({
        url: api.delete,
        method: "DELETE",
        params: data
    })
}

/**
 * 明细
 */
export function details(data) {
    return axios({
        url: api.details,
        method: "GET",
        params: data
    })
}

/**
 * 工序明细
 */
 export function listErpProcessRouteDetailVo(data) {
  return axios({
      url: api.listErpProcessRouteDetailVo,
      method: "GET",
      params: data
  })
}
/**
 * 审核
 */
 export function examine(data) {
    return axios({
        url: api.examine,
        method: "GET",
        params: data
    })
}

export function listProcessRouteAndPriceDetailVoByRouteDetailIds(data) {
    return axios({
        url: api.listProcessRouteAndPriceDetailVoByRouteDetailIds,
        method: "post",
        data: data
    })
}
